package com.xja.book.service.impl;


import com.xja.book.entity.BookType;
import com.xja.book.mapper.BookTypeMapper;
import com.xja.book.service.BookTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("bookTypeService")//接口首字母小写
public class BookTypeServiceImpl implements BookTypeService {

    @Autowired
    private BookTypeMapper bookTypeMapper;//使用注解就必须要写get和set了

    public List<BookType> selectAll() throws Exception {
        return bookTypeMapper.selectAll();
    }

    public void addBoookType(BookType bookType) throws Exception {
        bookTypeMapper.insertSelective(bookType);
    }


}
